{template 'header'}
<link type="text/css" rel="stylesheet" href="{$_W['siteroot']}addons/superman_sign/template/mobile/css/global.css">
<!--已关注用户分享页的情况-->
{if $uid}
<div class="row">
	<div class="col-xs-12" style="padding: 0">
		<img src="{php echo tomedia($invite_img);}"  class="img-responsive"  alt="" width=100% />
	</div>
</div>
<div class="card border-1px" style="margin: 0; padding: 0">
	<table class="table table-bordered" style="margin-bottom: 0">
		<tbody class="text-center">
			<tr>
				<th class="text-center">已经邀请</th>
				<th class="text-center">共获{$creditname}</th>
				<th class="text-center">我的暗号</th>
			</tr>
			<tr>
				<td>{$count}人</td>
				<td>{$get_credit}</td>
				<td style="color: #ff0000; font-weight: bold">{$setting_config['anhao_prefix']}{$uid}</td>
			</tr>
		</tbody>
	</table>
</div>
<div class="card border-1px" style="padding: 10px;">
	{php echo htmlspecialchars_decode($invite_rule);}
</div>
<div class="row" style="margin-bottom: 10px;">
	<div class="col-xs-12">
		<a href="javascript:;" class="btn btn-success btn-block" onclick="document.getElementById('mcover').style.display='block';">发送给好友</a>
	</div>
</div>
<div id="mcover" onclick="document.getElementById('mcover').style.display='';" style="display: none;">
	<img src="{$_W['siteroot']}addons/superman_sign/template/mobile/images/sharer.png">
</div>
<script>
	wx.ready(function() {
		wx.hideMenuItems({
			menuList: [
				'menuItem:share:timeline' // 分享到朋友圈
			],
			success: function (res) {
				console.log('OK');
			},
			fail: function (res) {
				console.log('FAIL');
			}
		});
	});
</script>

{else}
<!--未关注用户引导页的情况-->
<div class="card border-1px" style="padding: 10px 0; margin-top: 0">
	<div class="row">
		<div class="col-xs-2" style="padding: 0 10px;">
			<img src="{php echo tomedia($data['avatar'])}" onerror="this.src='../app/resource/images/heading.jpg'" style="height: 40px; width:40px; border-radius: 40px;"  alt=""/>
		</div>
		<div class="col-xs-10" style="padding: 0 10px 0 0; line-height: 40px;">
			<span>{if $data['nickname']!=''}{$data['nickname']}{else}{$from_uid}{/if}</span>
			<span>邀请您来赚积分啦！</span>
		</div>
	</div>
</div>
<div class="card border-1px" style="padding: 10px;">
	<span style="font-size: 18px; font-weight: bold; padding: 5px 0; display: block">参与方法</span>
	<p>1.{$guide}</p>
	<p>2.发送暗号“<span style="color: #FF0000;"><b>{$setting_config['anhao_prefix']}{$from_uid}</b></span>”</p>
	<div>{php echo htmlspecialchars_decode($invited_show);}</div>
	<div align="center" style="padding-top: 20px; padding-bottom: 10px;">
		<img src="{$_W['account']['qrcode']}" style="height: 200px; width:200px;"/>
	</div>
	<div class="text-center">长按二维码关注公众号</div>
</div>
{/if}

{template 'footer'}
